// 导出单个对象
// module.exports = {
//     name: "Example",
//     greet: function() {
//         console.log("Hello!");
//     }
// };
 
// 或者导出多个对象
exports.getCurrentTime = function () {
    var date = new Date();
    var year = date.getFullYear();
    var month = date.getMonth() + 1;
    var day = date.getDate();
    var hour = date.getHours();
    var minute = date.getMinutes();
    var second = date.getSeconds();
}
exports.getFullDomain =function ( req, port) {
    const protocol = req.protocol;
    const host = req.hostname;
    const fullDomain = `${protocol}://${host}:${port}`;
    return fullDomain;
}